1. /* sfffsmul.cpp by K.Tsuru */
  2. // function ID = 714 DRADIX
  3. /*************************************
  4. SFraction class
  5. It multiplies "x" by a short value "n".
  6. ***************************************/
  7. #ifndef SN_H
  8. #include "sn.h"
  9. #endif
  10. SFraction FsMult(const SFraction& x, ulong n){
  11. if(n == 1UL) return x;
  12. if(!n) return 0.0;
  13. SFraction r(x);
  14. if(n <= r.num.SlOpMaxValue()) r.num = LsMult(r.num, n);
  15. else r.num *= n;
  16. r.reduceDone = false;
  17. #if REDUCE_SIZE != 0
  18. r.reduce(false);
  19. #else
  20. r.reduce();
  21. #endif
  22. return r;
  23. }

sfffsmul.cpp : last modifiled at 2017/10/23 11:10:12(552 bytes)
created at 2015/12/22 16:07:29
The creation time of this html file is 2017/10/23 11:26:54 (Mon Oct 23 11:26:54 2017).